package main

import (
	"gitee.com/xuender/oils/ids"
	"gitee.com/xuender/oils/logs"
	"gitee.com/xuender/pp/cui"
	"gitee.com/xuender/pp/pb"
)

func main() {
	logs.SetLogger()

	s := cui.NewService()
	me := ids.New()

	s.SetMe(&pb.User{
		ID:   me.Bytes(),
		Nick: "本人",
	})
	s.Sender(s.Append)

	id := ids.New()

	s.AddUser(&pb.User{Nick: "测试", ID: id.Bytes()})
	s.AddUser(&pb.User{Nick: "张三", ID: ids.New().Bytes()})
	s.SelectUser(id)
	_ = s.Run()
}
